{layout name="layout" /}

<div class="m2banBg">
    <div class="m2ban">
        {empty name='data_banner.banner'}
        <img src="/static/images/m2ban05.jpg" width="1440" height="255" /> {else/}
        <img src="{$data_banner.banner}" /> {/empty}
        <img class="m2banImg" src="/static/index/images/m2banImg.png" width="265" height="255" />
    </div>
</div>
<div class="main2">
    <div class="m2L">
        <div class="m3pos">您当前所在的位置：
            <a href="/">首页</a> > 
            {neq name="cid" value="61"}
                <a href="/designer/lists/61">设计团队</a> >
            {/neq}
            <span class="cor_red">
                {$cid|model('category')->getCateName}
            </span>
        </div>
        <div class="m2l_t1 m2l_t1a">
            {empty name='data_banner.img_title'}
            <img src="/static/index/images/m2t5.jpg" width="733" height="55" /> {else/}
            <img src="{$data_banner.img_title}" /> {/empty}
        </div>
        <div class="m2m_u1">
            <ul>
                {foreach $data as $val}
                <li>
                    <a class="fl" href="/designer/{$val.id}">
                        <img src="{$val.photograph}" alt="{$val.name}" width="218" height="298">
                    </a>
                    <div class="m2m_txt">
                        <dl>
                            <dd>
                                <span class="cor_cf">名称：</span>
                                <a href="/designer/{$val.id}">
                                    {$val.name}
                                </a>
                            </dd>
                            <dd>
                                <span class="cor_cf">职位：</span>
                                {$position[$val.cid]}
                            </dd>
                            <dd>
                                <span class="cor_cf">案例作品：</span>
                                <span class="works">{$val.works}</span>

                            </dd>
                            <dd>
                                <span class="cor_cf">设计理念：</span>
                                <span class="summary">{$val.idea}</span>
                            </dd>
                        </dl>
                        <div class="m2m_bm">
                            <a class="m2m_ask" target="_blank" href="http://wpa.qq.com/msgrd?v=1&uin=271764063&site=walmart&menu=yes">在线咨询</a>
                            <!-- <%--<a class="m2m_ask m2m_yy" href="#">预约设计师</a>--%> -->
                        </div>
                    </div>
                </li>
                {/foreach}
            </ul>
            <div class="clear"></div>
        </div>
        <div class="pagin" id="Paging">
            {$data->render()}
        </div>
    </div>
    <div class="clear"></div>
</div>
<script type="text/javascript">
    function getddd() {
        $(".works").each(function (x) {
            var works = $(this).html();
            if (works.length > 30) {
                $(this).html(works.substring(0, 30) + '...');
            }
        });

        $(".summary").each(function (x) {
            var summary = $(this).html();
            if (summary.length > 40) {
                $(this).html(summary.substring(0, 40) + '...');
            }
        });
    }
    getddd();
</script>